import request from '@/utils/request'

// 查询成分列表
export function listData(query) {
  return request({
    url: '/constituent/data/list',
    method: 'get',
    params: query
  })
}

// 查询成分详细
export function getData(constituentId) {
  return request({
    url: '/constituent/data/' + constituentId,
    method: 'get'
  })
}

// 新增成分
export function addData(data) {
  return request({
    url: '/constituent/data',
    method: 'post',
    data: data
  })
}

// 修改成分
export function updateData(data) {
  return request({
    url: '/constituent/data',
    method: 'put',
    data: data
  })
}

// 删除成分
export function delData(constituentId) {
  return request({
    url: '/constituent/data/' + constituentId,
    method: 'delete'
  })
}
